app.service('z-employee-s', [
		'$rootScope',
		'$z-http',
		'ZModel',
		function($rootScope, $http, ZModel) {
			var service = {
					getEmployeeList : function(data,success,fault) {
						$http.post("employee/getEmployeeList.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
		  					if(fault) {
		  						fault(data);
		  					}
		  				});
					},
					getPrivilegeGroupList : function(data,success,fault) {
						$http.post("privilegeGroup/getPrivilegeGroupList.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
		  					if(fault) {
		  						fault(data);
		  					}
		  				});
					},
					getEmployeeIdList : function(data,success,fault) {
						$http.post("employee/getEmployeeIdList.do",
							$.param(data),
							{headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
							).success(function(data) {
								success(data.success);
			  				}).error(function(data) {
			  					if(fault) {
			  						fault(data);
			  				}
		  				});
					},
					saveEmployee : function(data,success,fault) {
						$http.post("employee/saveEmployee.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
		  					if(fault) {
		  						fault(data);
		  					}
		  				});
					},
					updateEmployee : function(data,success,fault) {
						$http.post("employee/updateEmployee.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
		  					if(fault) {
		  						fault(data);
		  					}
		  				});
					},
					updateVisaWaiver : function(data,success,fault) {
						$http.post("employee/updateVisaWaiver.do",data)
						.success(function() {
							success();
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					deleteEmployee : function(data,success,fault) {
						$http.post("employee/deleteEmployee.do",data)
						.success(function() {
							success();
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					updateEmployeeByRevocation : function(data,success,fault) {
						$http.post("employee/updateEmployeeByRevocation.do",data)
						.success(function() {
							success();
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					resetEmployeePassWord : function(data,success,fault) {
						$http.post("employee/resetEmployeePassWord.do",
								$.param(data),
								{headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
								).success(function(data) {
									success(data.success);
				  				}).error(function(data) {
				  					if(fault) {
				  						fault(data);
				  				}
			  				});
					},
					getTemplateUrl:function (success, fault) {
		                $http.get("employee/getEmployeeIsSeparatedURL.do", {
		                    headers: {
		                        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
		                    }
		                }).success(success).error(fault);
		            },
		            importEmployeeIsSeparated:function (data, success, fault) {
		                $http.post("employee/importEmployeeIsSeparated.do",
		                    $.param(data), {
		                        headers: {
		                            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
		                        }
		                    }).success(success).error(fault);
		            },				
			};
			return service;
		} ]);